<?php
    /**
    * user.php
    * 
    * @author Osuvaldo Ramos <xdracox@gmail.com>
    * @copyright Copyright (c) 2008, Osuvaldo Ramos
    * @license http://www.opensource.org/licenses/bsd-license.php
    * @package Atman
    */
    
    require_once 'Validate.php';
    
    /**
    * Authorization method that requires a user be logged in.
    * @package Atman
    */
    class AT_Auth_user extends AT_Auth
    {
        /**
        * __construct()
        */
        public function __construct()
        {
            parent::__construct();
        }
        
        /**
        * Authenticates a user based on login information.
        * @return boolean
        */
        public function authenticate()
        {
            $session = AT_Session::singleton();
            return $session->get('userID') != NULL;
        }
        
        /**
        * __destruct()
        */
        public function __destruct()
        {
            parent::__destruct();
        }
    }
?>
